package com.shortvedio.base.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shortvedio.base.model.dto.VedioContentDto;
import com.shortvedio.base.model.po.UserLike;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserLikeMapper extends BaseMapper<UserLike> {
    @Select("SELECT * FROM videos_content WHERE id in (SELECT video_id FROM user_like WHERE user_id = #{userId}) AND status = 2 LIMIT #{start},#{size}")
    public List<VedioContentDto> selectLikeList(@Param("userId") Long userId, @Param("start") Integer start, @Param("size") Integer size);//获取喜欢的视频列表
}
